<html lang="en">
<%@ page language="java" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/purchaseOrders.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<style type="text/css">
a { text-decoration : none}
@page {
  size: landscape;
	}
}
</style>

<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type='text/css' rel='stylesheet'>
<SCRIPT language="JavaScript">

function sendMail ( vendorId, purchaseOrderId, poType, poNumber )
{
    newWindow = window.open ('<%=chipTracContext%>/sendPoMailAck.do?action=showSendMailWindow&vendorId='+vendorId+'&purchaseOrderId='+purchaseOrderId+'&poType='+poType+'&poNumber='+poNumber,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}

</SCRIPT>

</HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<!-- body starts -->
<html:form method="post" name="purchaseOrderForm" action="/purchaseOrders" type="com.scalar.chiptrack.finance.openpo.forms.PurchaseOrderForm">
<table width="90%" align=center border='0' cellspacing=0 cellpadding=0>
    <tr>
		<td width="30%" align="center">
			<img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="84" width="200" border=0>
		</td>
        <td width="40%"  align="center" class="NArialL">
			<font class='NArialW'>Purchase Order Acknowledgement</font>
            <bean:write name="purchaseOrderForm" property="clientAddrWithOutEmailObjFormatted" filter="false"/>
		</td>
        <td width="15%" id="printerIconCell">
			<table width='50'align=center background='<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif'>
				<tr>
					<td>
						<a href="javascript:window.print();" title='Click here to print the purchase order'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
				        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
				        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</td>
				</tr>
			</table>
        </td>

        <td width="15%" id="emailIconCell">
			<table border ="0"  background='<%=chipTracContext%>/jsp/includes/images/email1.gif'>
				<tr>
					<td>
						<a href="javascript:sendMail(<bean:write name="purchaseOrderForm" property="vendor_id"/>, <bean:write name="purchaseOrderForm" property="purchaseOrder_Id"/>, <bean:write name="purchaseOrderForm" property="poType" />, '<bean:write name="purchaseOrderForm" property="purchaseOrderNumber" />' )" title='Click here to send mail'>&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</td>
				</tr>
			</table>
        </td>
	</tr>
    <tr>
    <td colspan='5' height='35'>&nbsp;</td>
    </tr>
    <tr>
		<td colspan='5' width="40%">
			<table width="100%" border=0 cellspacing=0 cellpadding=0>
				<tr>
			        <td bgcolor='#FFFFEE'  height="100%" class="NArialRS" align="left" width="40%">
						<table width="100%" height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0'>
							<tr height=30>
								<td class="NArialL" bgcolor="#DEE1E2" >Bill To Address:</td>
							</tr>
							<tr>
								<td class="NArialL" valign="top">
                                <bean:write name="purchaseOrderForm" property="billingAddressAsStringForHTMLWithBreaks" filter="false"/>&nbsp;
								</td>
							</tr>
						</table>
					</td>
					<td width="20%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
					<td bgcolor='#FFFFEE' class="NArialRS" align ="right"  width="40%" height="100%">
						<table width="100%"  height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0'>
							<tr height=30><td class="NArialL" bgcolor="#DEE1E2" >Ship To Address:</td></tr>
							<tr>
								<td class="NArialL" valign="top">
                                <bean:write name="purchaseOrderForm" property="shippingAddressAsStringForHTMLWithBreaks" filter="false"/>&nbsp;
								</td>
							</tr>
			            </table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
		<td colspan=5 width="100%">

			<table width='100%' bordercolor='#000000' border="1" cellspacing='0' cellpadding='0' align='left'>
				<tr height=20>
					<td class='NArialL' bgcolor='#DEE1E2' align=center >PO&nbsp;Number</td>
					<td class='NArialL' bgcolor='#DEE1E2' align=center >PO&nbsp;Type</td>
					<td class='NArialL' bgcolor='#DEE1E2' align=center >PO&nbsp;Date</td>
					<td class='NArialL' bgcolor='#DEE1E2' align=center >Vendor&nbsp;Name</td>
                    <td class='NArialL' bgcolor='#DEE1E2' align=center >Valid&nbsp;To</td>
                </tr>
				<tr height=20>
					<td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="purchaseOrderNumber" /></td>
					<td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="poTypeLabel" /></td>
					<td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="purchaseOrderDate" /></td>
					<td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="vendorName" /></td>
                    <td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="validToDate" /></td>
                </tr>
                <tr height=20>
                    <td colspan='3' class='NArialL' bgcolor='#DEE1E2' align=center >Shipping Method</td>
					<td colspan='2' class='NArialL' bgcolor='#DEE1E2' align=center >Pay Terms</td>
                </tr>
                <tr height=20>
					<td colspan='3' bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="shipMethod" />&nbsp;</td>
					<td colspan='2' bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderForm" property="payTerms" />&nbsp;</td>
                </tr>
            </table>
        </td>
	</tr>
    <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
	<tr><td colspan=5><font class="NArialR"><strong><u>Comments: </u></strong></font></td></tr>
    <tr><td colspan=5 bgcolor='#DEE1E2' width="100%" class='NArialL'><bean:write name="purchaseOrderForm" property="comments" /><font class="NArialRS">
    &nbsp;
	</font></td></tr>
	<tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

	<tr>
		<td colspan=5>
			<table width='100%' border=1 bordercolor='#000000' cellspacing='0' cellpadding='0' align='center'>
			<tr height=20 border=1 >
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Line&nbsp;Item</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Process&nbsp;Name</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Part&nbsp;Number</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Vendor Part&nbsp;Number</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Description</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Package&nbsp;Type</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Req.&nbsp;Date</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Req.&nbsp;Qty</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Unit&nbsp;Cost($)</td>
				<td class='NArialL' bgcolor='#DEE1E2' align=center>Ext.&nbsp;Cost($)</td>
			</tr>
            <nested:iterate property="purchaseOrderLineItemList" type="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem" indexId="lineItemIndex">
			<tr height=20 >
				<td bgcolor='#FFFFEE' class='NArialL' align=center border=1><P ALIGN="CENTER"><nested:write property="purchaseOrderLineItemNumber"/>&nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center ><bean:write name="purchaseOrderLineItemList" property="processName"/> &nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center ><nested:write name="purchaseOrderLineItemList" property="partNumber"/>&nbsp;  </td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center ><nested:write name="purchaseOrderLineItemList" property="customerPartNumber"/>&nbsp;  </td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center ><nested:write name="purchaseOrderLineItemList" property="description"/>&nbsp;  </td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center><bean:write name="purchaseOrderLineItemList" property="packageType"/>&nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=center><nested:write name="purchaseOrderLineItemList" property="requestedDate"/>&nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=right><nested:write name="purchaseOrderLineItemList" property="requestedQuantity"/>&nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=right><nested:write name="purchaseOrderLineItemList" property="unitCost"/>&nbsp;</td>
				<td bgcolor='#FFFFEE' class='NArialL' align=right><nested:write name="purchaseOrderLineItemList" property="extendedCost"/>&nbsp;</td>
			</tr>
            </nested:iterate>
			</table>
		</td>
	</tr>
	<tr border=1>
        <td colspan=5>
		<table width='25%' border=1 align=right bordercolor='#000000'  cellspacing='0' cellpadding='0'>
			<tr>
				<td bgcolor='#DEE1E2' class='NArialL' align=right >Sub Total:$</td>
				<td bgcolor='#FFFFEE'class='NArialL'align='right' ><bean:write name="purchaseOrderForm" property="subTotal"/></td>
			</tr>
            <tr>
				<td bgcolor='#DEE1E2' class='NArialL' width='66%' align=right >Freight:$</td>
				<td bgcolor='#FFFFEE'  class='NArialL' align='right'  width='34%'><bean:write name="purchaseOrderForm" property="freight"/></td>
			</tr>
			<tr>
				<td bgcolor='#DEE1E2' class='NArialL' nowrap align=right >Trade Discount:$</td>
				<td bgcolor='#FFFFEE'  class='NArialL' align='right'><bean:write name="purchaseOrderForm" property="tradeDiscount"/></td>
			</tr>
			<tr>
				<td bgcolor='#DEE1E2' class='NArialL' align=right>Miscellaneous:$</td>
				<td class='NArialL' bgcolor='#FFFFEE' align='right'><bean:write name="purchaseOrderForm" property="miscellaneous"/></td>
			</tr>
			<tr>
				<td bgcolor='#DEE1E2' class='NArialL'  width="" align=right >Tax&nbsp:$</td>
				<td  class='NArialL' bgcolor='#FFFFEE' align='right' width=""><bean:write name="purchaseOrderForm" property="tax"/></td>
			</tr>
			<tr>
				<td bgcolor='#DEE1E2' class='NArialL' align=right >Order Total:$</td>
				<td  class='NArialL' bgcolor='#FFFFEE' align='right'><bean:write name="purchaseOrderForm" property="total"/></td>
			</tr>
		</table>
		</td>
	</tr>
</table>

</html:form>
</body>
</html>